import {types as mutationTypes} from './mutations';

export const types = {
    fetchUserInfo: 'fetchUserInfo',
};

export default {
    [types.fetchUserInfo](context) {
        uni.showLoading({
            title: '',
        });
        setTimeout(() => {
            uni.hideLoading();
            context.commit(mutationTypes.updateUserInfo, {
                data: {
                    nickName: '昵称',
                    realName: '真实姓名',
                    phone: '18510787354',
                    avatarUrl: 'https://thirdwx.qlogo.cn/mmopen/vi_32/AicFRIzwNKhtf9ek05C0tz65stovxs2WUQEbegfGnbeqic3El8n43PicZSEiazuPVmjkwQLSzZ97ibkaJTueGVmoExg/132',
                    roles: ['admin'],
                },
            });
        }, 2000);
    }
}